﻿using System;
using System.Web;
using System.ComponentModel;

namespace ChapterX.Model
{
    public class ModuleBase : System.Web.UI.UserControl
    {
        public void ClearMessages()
        {
            if (this.Page != null && this.Page is PageBase)
            {
                (this.Page as PageBase).ClearMessages();
            }
        }

        public void SetInfoMessage(String message)
        {
            if (this.Page != null && this.Page is PageBase)
            {
                (this.Page as PageBase).SetInfoMessage(message);
            }
        }

        public void SetErrorMessage(String message)
        {
            if (this.Page != null && this.Page is PageBase)
            {
                (this.Page as PageBase).SetErrorMessage(message);
            }
        }
    }
}
